<!DOCTYPE html>
<html lang="en">
	<head>
	<meta charset="utf-8" />
	<title>UI</title>
	<script type="text/javascript" src="../lufylegend-1.7.7.min.js"></script>
	<script type="text/javascript" src="../lufylegend.ui-0.1.1.min.js"></script>
	</head>
	<body>
			<div id="legend"></div>
<script>
init(50,"legend",800,450,main);
var layer,button;
function main(){
	LGlobal.setDebug(true);
	layer = new LSprite();
	addChild(layer);
	addButton();
	addRadio();
	addCheckBox();
	addComboBox();
	
	var showObject = new LSprite();
	showObject.graphics.drawRect(2,"#ff0000",[0,0,500,500],true,"#ff0000");
	var t = new LTextField();
	//t.y = 300;
	t.color = "#000000";
	t.text = "あいうえおかきくけこさしすせそたちつてとあいうえおかきくけこさしすせそたちつてとあいうえおかきくけこさしすせそたちつてとあいうえおかきくけこさしすせそたちつてとあいうえおかきくけこさしすせそたちつてとあいうえおかきくけこさしすせそたちつてとあいうえおかきくけこさしすせそたちつてとあいうえおかきくけこさしすせそたちつてと";
	t.width = 300;
	t.stroke = true;
	t.size = 30;
	t.setWordWrap(true,35);
	showObject.addChild(t);
	var sc = new LScrollbar(showObject,200,200);
	sc.x = 450;
	sc.y = 20;
	layer.addChild(sc);
	layer.addEventListener(LMouseEvent.MOUSE_UP,function(e){
	button.y += 10;
	});
}
function addComboBox(){
	var com = new LComboBox(20);
	com.x = 50;
	com.y= 210;
	com.setChild({label:"测试一",value:"aaa"});
	com.setChild({label:"测试二",value:"bbb"});
	com.setChild({label:"测试三",value:"ccc"});
	com.setChild({label:"测试四",value:"ddd"});
	layer.addChild(com);
}
function addCheckBox(){
	var check1 = new LCheckBox();
	check1.x = 50;
	check1.y= 160;
	layer.addChild(check1);
	var check2 = new LCheckBox();
	check2.x = 100;
	check2.y= 160;
	layer.addChild(check2);
}
function addRadio(){
	var radio = new LRadio();
	radio.x = 50;
	radio.y = 130;
	radio.setChildRadio(1,0,0);
	radio.setChildRadio(2,50,0);
	radio.setChildRadio(3,100,0);
	layer.addChild(radio);
}
function addButton(){
	var button01 = new LButtonSample1("测试按钮1");
	button01.x = 10;
	button01.y = 10;
	layer.addChild(button01);
	
	var button02 = new LButtonSample1("测试按钮2");
	button02.backgroundCorl = "#008800";
	button02.x = 150;
	button02.y = 10;
	layer.addChild(button02);
	
	var button03 = new LButtonSample1("测试按钮3");
	button03.backgroundCorl = "red";
	button03.x = 290;
	button03.y = 10;
	layer.addChild(button03);
	
	var button04 = new LButtonSample2("测试按钮4");
	button04.backgroundCorl = "blue";
	button04.x = 10;
	button04.y = 70;
	layer.addChild(button04);
	
	var button05 = new LButtonSample2("测试按钮5",12);
	button05.backgroundCorl = "purple";
	button05.x = 150;
	button05.y = 70;
	layer.addChild(button05);
	
	var button06 = new LButtonSample2("测试按钮6",20);
	button06.backgroundCorl = "orange";
	button06.x = 260;
	button06.y = 70;
	layer.addChild(button06);
	button = button06;
}
</script>
	</body>
</html>
